package com.cj.mobile.iabp.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @ProjectName: AptitudeAndroid
 * @Package: com.cj.mobile.iabp.mvp.model.entity
 * @ClassName: ContractingPartyInfo
 * @Description: 合同中的合作方
 * @Author: WLY
 * @CreateDate: 2024/1/17 9:48
 */
public class ContractingPartyInfo implements Parcelable, Cloneable {
    public ContractingPartyInfo() {
    }

    /**
     * 门店
     */
    public ContractingPartyInfo(String id, String name, String contacts, String mobilePhone) {
//        "mainOrgId": 8,
//        "areaId": 291211008003,
//        "address": "广东省深圳市福田区广东省深圳市福田区莲花街道莲花北社区新华路555号",
//        "mobilePhone": "13631801800",
//        "storeName": "胡文龙3门店",
//        "userName": "胡文龙门3",
//        "userId": "S009034"

        this.userId = id;
        this.storeName = name;
        this.userName = contacts;
        this.mobilePhone = mobilePhone;
    }

    /**
     * 仓库
     */
    public ContractingPartyInfo(String orgId, String warehouseName, String userName, String warehouseNo, String address, String employee, String mobilePhone) {
        this.orgId = orgId;
        this.warehouseName = warehouseName;
        this.userName = userName;
        this.warehouseNo = warehouseNo;
        this.address = address;
        this.employee = employee;
        this.mobilePhone = mobilePhone;
    }

    /**
     * 合作方
     */
    public ContractingPartyInfo(String orgId, String orgName, String userName, String mobilePhone, String address) {
        this.orgId = orgId;
        this.orgName = orgName;
        this.userName = userName;
        this.mobilePhone = mobilePhone;
        this.address = address;
    }

    /*--------------------------------通用--------------------------------*/
    // 联系人
    private String userName;
    // 联系方式
    private String mobilePhone;
    // 地址
    private String address;

    /*--------------------------------门店--------------------------------*/
    // 门店id
    private String userId;
    // 门店名称
    private String storeName;
    // 区域id
    private String areaId;
    // 组织id
    private String mainOrgId;

    /*--------------------------------仓库--------------------------------*/
    private String employee;
    // 仓库名称
    private String warehouseName;
    // 仓库id
    private String orgId;
    // 仓库编号
    private String warehouseNo;

    /*--------------------------------合作方--------------------------------*/
    private String orgName;

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getEmployee() {
        return employee;
    }

    public void setEmployee(String employee) {
        this.employee = employee;
    }

    public String getWarehouseName() {
        return warehouseName;
    }

    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getWarehouseNo() {
        return warehouseNo;
    }

    public void setWarehouseNo(String warehouseNo) {
        this.warehouseNo = warehouseNo;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    public String getMainOrgId() {
        return mainOrgId;
    }

    public void setMainOrgId(String mainOrgId) {
        this.mainOrgId = mainOrgId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public ContractingPartyInfo clone() {
        try {
            ContractingPartyInfo clone = (ContractingPartyInfo) super.clone();
            // TODO: copy mutable state here, so the clone can't change the internals of the original
            return clone;
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.userName);
        dest.writeString(this.mobilePhone);
        dest.writeString(this.address);
        dest.writeString(this.userId);
        dest.writeString(this.storeName);
        dest.writeString(this.areaId);
        dest.writeString(this.mainOrgId);
        dest.writeString(this.employee);
        dest.writeString(this.warehouseName);
        dest.writeString(this.orgId);
        dest.writeString(this.warehouseNo);
        dest.writeString(this.orgName);
    }

    public void readFromParcel(Parcel source) {
        this.userName = source.readString();
        this.mobilePhone = source.readString();
        this.address = source.readString();
        this.userId = source.readString();
        this.storeName = source.readString();
        this.areaId = source.readString();
        this.mainOrgId = source.readString();
        this.employee = source.readString();
        this.warehouseName = source.readString();
        this.orgId = source.readString();
        this.warehouseNo = source.readString();
        this.orgName = source.readString();
    }

    protected ContractingPartyInfo(Parcel in) {
        this.userName = in.readString();
        this.mobilePhone = in.readString();
        this.address = in.readString();
        this.userId = in.readString();
        this.storeName = in.readString();
        this.areaId = in.readString();
        this.mainOrgId = in.readString();
        this.employee = in.readString();
        this.warehouseName = in.readString();
        this.orgId = in.readString();
        this.warehouseNo = in.readString();
        this.orgName = in.readString();
    }

    public static final Creator<ContractingPartyInfo> CREATOR = new Creator<ContractingPartyInfo>() {
        @Override
        public ContractingPartyInfo createFromParcel(Parcel source) {
            return new ContractingPartyInfo(source);
        }

        @Override
        public ContractingPartyInfo[] newArray(int size) {
            return new ContractingPartyInfo[size];
        }
    };
}
